package module02.task03;

public class Task03Test {
    public static void main(String[] args) {
        System.out.println("========注册卡=========");
        // 定义通话套餐数量与资费
        MobilePlan mp = new MobilePlan(1, 0, 0);
        // 定义上网套餐与资费
        DataPlan dp = new DataPlan(1, 0);


        // 使用多态调用两种plan的show方法
        Plan[] plans = new Plan[2];
        plans[0] = dp;
        plans[1] = mp;

        for(int i=0; i<plans.length; i++){
            plans[i].show();
        }
    }
}
